<div class="form_details">
	<div class="space10"></div>
	<!--form_container starts-->
	<div class="form_container">
		<h4 style="background-color:#FF8200 !important;color:#ffffff !important;">
			<?php if(isset($form_detail[0]['event_name'])){ echo "Nomination for ".$form_detail[0]['event_name'].' - ';} ?>
			<?php if(isset($form_detail[0]['award_name'])){ echo $form_detail[0]['award_name'];} ?>
		</h4>
	</div>
	<!--form_container starts-->
	<div class="space10"></div>
	<!--form_container starts-->
	
	<!------------------------------------------Personal Info------------------------------->
	<?php echo form_open(BASE_URL . '/user/add_user_nomination', array('id' => 'user_nomination_form', 'method' => 'post')); ?>
	<div class="form_container">
		<h4>Nominator Detail</h4>
		<?php if(isset($form_list_nom) && !empty($form_list_nom)){
			foreach($form_list_nom as $key => $temp)
			{
				if(isset($temp['master_nomination_form_subcategory']) && $temp['master_nomination_form_subcategory'] == 'Nominating Personal')
				{
					$personal[$key]['id']=$temp['event_nomination_form_id'];
					$personal[$key]['name']=$temp['master_nomination_form_name'];
					$personal[$key]['input_type']=$temp['master_nomination_form_type'];
					$personal[$key]['label']=$temp['event_nomination_form_label'];
					$personal[$key]['man']=$temp['event_nomination_form_mandatory'];
					$personal[$key]['type_extra']=$temp['master_nomination_form_extra'];
				}
			}
			for($i=0;$i<=ceil(count($personal)/2);$i++)
			{
				$n = $i*2;
				$m = $n+1;
		?>
			<!--row starts-->
			<div class="row1">
				<?php if(isset($personal[$n]['label'])){ ?>
				<div class="form-group col-sm-6">
					<label><?php echo $personal[$n]['label']; ?> <?php if($personal[$n]['man'] == 'Yes') echo "<span class='asterisk'>*</span>"; ?></label>
					<input type="hidden" value="<?php if($personal[$n]['man'] == 'Yes') echo "1"; else echo '0'; ?>" id="man-<?php echo $personal[$n]['name']; ?>" />
					<?php if(isset($personal[$n]['input_type'])){
						if($personal[$n]['input_type'] == 'input'){?>
							<input class="form-control white" id="<?php echo $personal[$n]['name']; ?>" name="<?php echo $personal[$n]['name']; ?>"   autocomplete="off" type="text" 
							<?php if($personal[$n]['man'] == 'Yes') echo 'required'; ?> onblur="validateForm('<?php echo $personal[$n]['name']; ?>');" value="">
                            <span id="<?php echo $personal[$n]['name']."_error"; ?>" style="color:#F00;"></span>
							<?php if(isset($personal[$n]['type_extra']) && $personal[$n]['type_extra'] == 'datepicker'){ ?>
								<script type="text/javascript">
									window.onload = function(){
										new JsDatePick({
											useMode:2,
											target:"<?php echo $personal[$n]['name']; ?>",
											dateFormat:"%d-%M-%Y",
											yearsRange:[1955,2050],
											imgPath:"<?php echo ASSET_URL; ?>img/"
										});
									};
								</script>
							<?php }?>
					<?php } if($personal[$n]['input_type'] == 'dropdown'){?>
							<select class="form-control white" id="<?php echo $personal[$n]['name']; ?>" name="<?php echo $personal[$n]['name']; ?>" onblur="validateForm('<?php echo $personal[$n]['name']; ?>');" <?php if($personal[$n]['man'] == 'Yes') echo 'required'; ?>>
								<option value="">-- Select --</option>
								<?php if($personal[$n]['label'] == 'Nationality' || $personal[$n]['label'] == 'Country of Residence'){
									if(isset($country) && !empty($country)){
										foreach($country as $temp){
											echo '<option value="'.$temp['country_id'].'">'.$temp['country_name'].'</option>';
										}
									}	
								}
								if($personal[$n]['type_extra'] == 'gender'){
									if(isset($gender) && !empty($gender)){
										foreach($gender as $temp){
											echo '<option value="'.$temp.'">'.$temp.'</option>';
										}
									}
								}
								?>
							</select>
					<?php }}?>
					<div class="error error_msg" id="err-<?php echo $personal[$n]['name']; ?>"></div>
				</div>
				<?php }
					if(isset($personal[$m]['label'])){
				?>
				<div class="form-group col-sm-6">
					<label><?php echo $personal[$m]['label']; ?> <?php if($personal[$m]['man'] == 'Yes') echo "<span class='asterisk'>*</span>"; ?></label>
					<input type="hidden" value="<?php if($personal[$m]['man'] == 'Yes') echo "1"; else echo '0'; ?>" id="man-<?php echo $personal[$m]['name']; ?>" />
					<?php if(isset($personal[$m]['input_type'])){ 
						if($personal[$m]['input_type'] == 'input'){?>
							<input class="form-control white" id="<?php echo $personal[$m]['name']; ?>" name="<?php echo $personal[$m]['name']; ?>"   autocomplete="off" type="text" 
							<?php if($personal[$m]['man'] == 'Yes') echo 'required'; ?> onblur="validateForm('<?php echo $personal[$m]['name']; ?>');" value="">
                             <span id="<?php echo $personal[$m]['name']."_error"; ?>" style="color:#F00;"></span>
							<?php if(isset($personal[$m]['type_extra']) && $personal[$m]['type_extra'] == 'datepicker'){ ?>
								<script type="text/javascript">
									window.onload = function(){
										new JsDatePick({
											useMode:2,
											target:"<?php echo $personal[$m]['name']; ?>",
											dateFormat:"%d-%M-%Y",
											yearsRange:[1955,2050],
											imgPath:"<?php echo ASSET_URL; ?>img/"
										});
									};
								</script>
							<?php }?>
						<?php } if($personal[$m]['input_type'] == 'dropdown'){?>
							<select class="form-control white" id="<?php echo $personal[$m]['name']; ?>" name="<?php echo $personal[$m]['name']; ?>" <?php if($personal[$m]['man'] == 'Yes') echo 'required'; ?> onblur="validateForm('<?php echo $personal[$m]['name']; ?>');">
								<option value="">-- Select --</option>
								<?php if($personal[$m]['label'] == 'Nationality' || $personal[$m]['label'] == 'Country of Residence'){
									if(isset($country) && !empty($country)){
										foreach($country as $temp){
											echo '<option value="'.$temp['country_id'].'">'.$temp['country_name'].'</option>';
										}
									}	
								}
								if($personal[$m]['type_extra'] == 'gender'){
									if(isset($gender) && !empty($gender)){
										foreach($gender as $temp){
											echo '<option value="'.$temp.'">'.$temp.'</option>';
										}
									}
								}
								?>
							</select>
					<?php }}?>
					<div class="error error_msg" id="err-<?php echo $personal[$m]['name']; ?>"></div>
				</div>
				<?php } ?>
				<div class="clearfix"></div>
			</div>
			<!--raw closed-->
		<?php }}?>
	</div>
	<!--form_container starts-->
	
	<div class="space30"></div>
	<input type="hidden" name="app_award_id" value="<?php if(isset($form_detail[0]['award_id'])){ echo $form_detail[0]['award_id'];} ?>" />
	<input type="hidden" name="app_event_id" value="<?php if(isset($form_detail[0]['event_id'])){ echo $form_detail[0]['event_id'];} ?>" />
	<input type="hidden" name="app_type" value="nominating" />
	<input type="hidden" name="app_submit" id="app_submit" value="<?php if(isset($form_submit) && !empty($form_submit)) echo '1';else echo '0'; ?>" />
	<button type="button" class="btn btn-primary" id="nom_form_submit_nominating">
		Save & Continue
	</button>
	<?php echo form_close(); ?>
</div>